import { axios } from '@/utils/request'

// 分页查询
export function pages(data) {
  return axios({
    url: '/app/pages',
    method: 'post',
    data: data
  })
}

// 获取应用信息
export function getOne(id) {
  return axios({
    url: '/app/getOne/'+id,
    method: 'get'
  })
}



// 新增、编辑应用
export function saveApp(data) {
  return axios({
    url: '/app/add',
    method: 'post',
    data: data
  })
}


// 删除
export function deleteApp(ids) {
  return axios({
    url: '/app/del',
    method: 'delete',
    data: ids
  })
}


// 新增密钥
export function saveSecret(data) {
  return axios({
    url: '/app/addSecret',
    method: 'post',
    data: data
  })
}

//删除密钥
export function delSecret(ids) {
  return axios({
    url: '/app/delSecret',
    method: 'delete',
    data: ids
  })
}

// 分页查询
export function secretPages(data) {
  return axios({
    url: '/app/secretPages',
    method: 'post',
    data: data
  })
}

export function genKey() {
  return axios({
    url: '/app/uniqueKey',
    method: 'get',
  })
}


export function orgs(){
  return axios({
    url: '/app/getOrgs',
    method: 'get'
  })
}